<?php

/** 
* Welcome controller 
* @author    	Marc PEPIN
* @package 	exemple
*/ 

class Welcome extends Slp_Controller {
	
	private $data;
	
	public function __construct() {
		parent::__construct();
		$this->data = array(
							'host' => $this->config->get("host", "database"),
							'pass' => $this->config->get("pass", "database"),
							'user' => $this->config->get("user", "database"),
							'db' => $this->config->get("db", "database"),
							'driver' => $this->config->get("driver", "database")
						  );	
	}
	//
	//insert into #table (#field) VALUES(#values) 
	public function index() {
	
		print_r($this->session->get("toto"));
		return $this->common->theme('embed', $this->data);
	}
	
	public function json() {
		$this->common->json_output($this->data);
	}
	
	public function hack() {
		/*
		$file = Slp::getInstance()->loadClass("Slp_File", array("/dev/random"));
		echo $file->isOpen();
		echo $file->readAll();
		*/
		//echo $this->loaded->SlF_File->readAll();	
	}
}
?>